package com.ledi.guns.modular.ledipay.service.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ledi.guns.common.persistence.dao.BillStreamMapper;
import com.ledi.guns.common.persistence.model.BillStream;
import com.ledi.guns.modular.ledipay.service.BillStreamService;

@Service
public class BillStreamServiceImpl implements BillStreamService {

	@Autowired
	private BillStreamMapper billStreamMapper;

	@Override
	public void billStream(String apiName, String billDetailId, String invokeType, String payway, String reqData, String resData) {

		BillStream billStream = new BillStream();
		billStream.setApiName(apiName);
		billStream.setBillDetailId(billDetailId);
		billStream.setInvokeType(invokeType);
		billStream.setPayWay(payway);
		billStream.setReqData(reqData);
		billStream.setResData(resData);
		billStream.setCreateTime(new Date());
		billStream.setReqTime(new Date());
		billStream.setResTime(new Date());
		billStreamMapper.insert(billStream);
	}
}
